﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Portal
{
    public static class HttpRequestExtion
    {
        public static bool IsAjaxRequest(this HttpRequest request)
        {
            string sheader = HttpContext.Current.Request.Headers["X-Requested-With"];
            bool isAjaxRequest = (sheader != null && sheader == "XMLHttpRequest");
            return isAjaxRequest;
        }
    }
}
